using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using System.Diagnostics;

namespace GameEngine.Navigation
{
	public class WayPoint
	{
		public WayPoint()
		{
			this.hash = WayPoint.hashGen++;
		}

		private static int hashGen = 0;
		private int hash;

		// Waypoint description
		public Vector3 Position;
		public WayPoint Parent;

		public IList<WayPoint> Neighbours = new List<WayPoint>();

		// Used in pathfinding as fast storage
		internal WayPoint ReachedFrom;
		internal float CurrentCost;
		internal float HeuristicCost;
		internal float TotalCost;

		public override bool Equals(object obj)
		{
			return this == obj;
		}

		public override int GetHashCode()
		{
			return this.hash;
		}
	}
}
